FROM registry.xxx-inc.com/app/python:v1.33.0-jammy
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1


# 创建用户和安装依赖

COPY . /app/

RUN  groupadd  app && \
        useradd -m -d /app -g app app && \
        pip install --no-cache-dir -r /app/requirements.txt -i https://repo.xxx-inc.com/repository/xxx-pypi/simple && \
        chown -R app:app /app

# 指定运行时的用户为app
USER    app
WORKDIR /app/

CMD [ "tail", "-f", "/etc/hosts" ]
EXPOSE 3000